package com.changgou.search.listener;

import com.changgou.search.service.SkuSearchService;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class GoodsAllListener {

    @Autowired
    private SkuSearchService skuSearchService;

    @RabbitListener(queues = "search_add_all_queue")
    public void importAll(String message){
        System.out.println("importAll....");
        skuSearchService.importAll();
    }

}
